package com.gitee.neuray.security.par.statisticalreport.controller;

import com.gitee.neuray.security.common.msg.ObjectRestResponse;
import com.gitee.neuray.security.common.util.Query;
import com.gitee.neuray.security.par.statisticalreport.biz.StatisticalReportBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;



/**
 * @author th
 */
@RestController
@RequestMapping("statisticalreport")
public class StatisticalReportController {

    @Autowired
    private StatisticalReportBiz statisticalReportBiz;


    /**
     * 横向数据
     * @return
     */
    @RequestMapping(value = "horizontal" ,method = RequestMethod.GET)
    public ObjectRestResponse horizontal(@RequestParam Map<String,Object> params){
        ObjectRestResponse response = new ObjectRestResponse();
        response.setResult(statisticalReportBiz.horizontal());
        return response;
    }

    /**
     * 纵向数据
     * @return
     */
    @RequestMapping(value = "vertical" ,method = RequestMethod.GET)
    public ObjectRestResponse vertical(@RequestParam Map<String,Object> params){
        ObjectRestResponse response = new ObjectRestResponse();
        response.setResult(statisticalReportBiz.vertical());
        return response;
    }

    /**
     * 内容数据
     * @return
     */
    @RequestMapping(value = "content" ,method = RequestMethod.GET)
    public ObjectRestResponse content(@RequestParam Map<String,Object> params){
        ObjectRestResponse response = new ObjectRestResponse();
        Query query = new Query(params);
        response.setResult(statisticalReportBiz.content(query));
        return response;
    }

    /**
     * 获取考核周期内容
     * @param params
     * @return
     */
    @RequestMapping(value = "parExamPeriodInfo" ,method = RequestMethod.GET)
    public ObjectRestResponse parExamPeriodInfo(@RequestParam Map<String,Object> params) {
        ObjectRestResponse response = new ObjectRestResponse();
        response.setResult(statisticalReportBiz.parExamPeriodInfo());
        return response;
    }

}
